<?php

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model app\models\User */
/* @var $message string */

use yii\helpers\Html;
use yii\bootstrap\ActiveForm;
use yii\helpers\Url;

$this->title = '用户登录';
?><!DOCTYPE html>
<html lang="en">
<head>
    <base href="/">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">
    <link rel="stylesheet" type="text/css" href="/font-awesome-4.2.0/css/font-awesome.min.css">
    <link rel="stylesheet" type="text/css" href="/css/reset.css">
    <link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
    <link rel="stylesheet" type="text/css" href="/css/sign.css">
    <?= Html::csrfMetaTags() ?>
    <title><?= Html::encode($this->title) ?></title>
    <?php $this->head() ?>
</head>
<body>
<div class="login container-fluid">
    <div class="row title-wrap">
        <div class="col-xs-2 back"><a href="#"><i class="fa fa-arrow-left"></i></a></div>
        <div class="col-xs-8 main-title"><span>用户登录</span></div>
        <div class="col-xs-2"></div>
    </div>
    <div class="row content">
        <div class="col-xs-10 col-xs-offset-1">
            <?php $form = ActiveForm::begin([
                'id' => 'login-form',
                'options' => [
                    'lk-role'=>'ajax-form'
                ],
            ]); ?>
                <div class="row form-group">
                    <div class="input-title">用户名</div>
                    <label for="user-name" class="label-wrap">
                        <span class="pull-left"><i class="fa fa-check"></i></span>
                        <div class="input-wrap">
                            <input type="text" name="user_name" id="user-name" class="user-input" placeholder="请输入用户名">
                        </div>
                    </label>
                </div>
                <div class="row form-group pawd">
                    <div class="input-title">密码</div>
                    <label for="password" class="label-wrap">
                        <span class="pull-left"><i class="fa fa-lock"></i></span>
                        <div class="input-wrap">
                            <input type="password" name="password" id="password" class="user-input" placeholder="请输入密码">
                        </div>
                    </label>
                </div>
                <?php if($message) { ?><div class="warn-wrap"><span>*&nbsp;<?=$message?></span></div><?php } ?>
                <div class="row button-wrap" style="margin-top: 55px;">
                    <?= Html::submitButton('登陆', ['class' => 'btn col-xs-5', 'name' => 'login-button']) ?>
                    <?= Html::a('前往注册', Url::to(['/user/register']), ['class' => 'btn col-xs-5 col-xs-offset-2', 'name' => 'login-button']) ?>
                </div>
            <?php ActiveForm::end(); ?>
        </div>
    </div>

    <!-- 这里简单的改改边框背景就好了-->
<!--    <div class="wechat">-->
<!--        <div class="row">-->
<!--            <div class="col-xs-4 col-xs-offset-4">-->
<!--                <div class="wechat-icon" id="weIcon">-->
<!--                    <span><i class="fa fa-wechat"></i></span>-->
<!--                </div>-->
<!--            </div>-->
<!--        </div>-->
<!--        <div class="row">-->
<!--            <div class="col-xs-12 wechat-word">-->
<!--                <span>微信登录</span>-->
<!--            </div>-->
<!--        </div>-->
<!--    </div>-->
</div>

<script src="js/lib/jquery/jquery.min.js"></script>
<script src="js/lib/bootstrap/bootstrap.min.js"></script>
<script src="js/util/ajax.js"></script>
<script src="js/util/ajax-ui.js"></script>
<div style="display: none;"><script src="http://s11.cnzz.com/z_stat.php?id=1261300538&web_id=1261300538" language="JavaScript"></script></div>
